Using Resource Functions for K–College Math

Wolfram|Alpha Math Team
Wolfram Technology Conference 2022

Overview

The Wolfram|Alpha Math Team has now published over 140 functions:

Map[KeySortBy[Position[{"Name","Description","DocumentationLink","ResourceObject"},#]&],Map[KeyDrop[{"ResourceType","Location","RepositoryLocation"}],ResourceSearch[{"ResourceType"->"Function",SearchQueryString["+Wolfram|Alpha +Math +Team"]},MaxItems->1000,If[$VersionNumber>12.&&MatchQ[System`$ResourceSystemBase,_String],ResourceSystemPath->{URL[$ResourceSystemBase]},Sequence@@{}]]]]

Motivation for Wolfram|Alpha Math Team ResourceFunctions

Categories of Functions

Specific Functionalities

Super Functions

Interactivity

Q&A

Motivation and Background

Specific Functionalities

Elementary math visualizations

ResourceFunction["TapeDiagram"][3/4]

ResourceFunction["TapeDiagram"][2/5 * 10]

ResourceFunction["FractionPieChart"][12/5]

Secondary math visualizations

ResourceFunction["SignChart"][x^2 - 4, x]

ResourceFunction["DerivativeSignCharts"][(x+8)^2(x - 2)+104, x, "ShowPlots" -> True]

Number theory

ResourceFunction["ClosestPrime"][4645]

Similar ResourceFunctions

Multicolumn[ResourceFunction/@{"TwinPrime", "MersennePrime", "FermatPrime", "AbundantNumber", "AbundantNumberQ", "DeficientNumber", "DeficientNumberQ", "IsTranscendentalNumber", "SuperperfectNumberQ"},{Automatic,2}]

Numeral representations

ResourceFunction["NumeralRepresentation"][123, "Mayan"]

ResourceFunction["NumeralRepresentation"][231, "Babylonian"]

possible numeral types: "Aegean", "Aztec", "Babylonian", "Egyptian", "Greek", "Mayan", "Roman", "Suzhou"

Statistics:  Regression or “Curve Fitting”

The statistics of regression, or “curve fitting,” is a very common exercise in applied science classes.

For example, let’s assume students are doing a kinematics lab exercise in a physics class.  

Let’s generate some data that might come from an assessment of motion under constant velocity:

linearData=Table[{t,RandomVariate@NormalDistribution[5+2t,1.0]},{t,0,10}];

We can fit this data to a line and get a very nice, formatted output, by using CurveFitReport:

ResourceFunction["CurveFitReport"][linearData,t,"Linear"]

Students can rapidly assess the mean initial position and estimated velocity from their regression and gauge the quality of the fit visually and statistically.

Let’s assume that, perhaps in the same physics course, students are instead collecting data on position under constant acceleration:

quadraticData=Table[{t,RandomVariate@NormalDistribution[5+2t+(t^2),1.0]},{t,0,10}];

ResourceFunction["CurveFitReport"][quadraticData,t,"Quadratic"]

Finally, let’s consider an example of exponential growth in a biology course.  

Assume students acquire the following data on the growing surface area of bacteria they’ve cultured on an agar plate:

exponentialData=Table[{t,RandomVariate@NormalDistribution[1.0(E^(1.25t)),3.0]},{t,0,4,0.5}];

We can fit it in exactly the same way, with the same function, albeit specifying it to be exponential:

ResourceFunction["CurveFitReport"][exponentialData,t,"Exponential"]

This CurveFitReort WFR function produces the following elements:

A plot of the data and resulting fit

A plot of the magnitude of the residuals

A variety of common statistics and goodness-of-fit metrics associated with the regression

Given the WFR function, each of these different model fits can be accessed via a single line of code or - in WANE - as a single natural language query.

As such, this is an example of a basic “Super Function” designed for aggregate ease of use, thus enabling rapid student engagement.

Super Functions

Tangent Lines, Tangent Planes, Osculating Circles

Association output (Access arguments through last argument and through key specification)

tangentLineAssoc = ResourceFunction["TangentLine"][x^2-2x+3, {x,2}, y]

ResourceFunction["TangentLine"][x^2-2x+3, {x,2}, y, "Plot"]

Manipulate[ResourceFunction["TangentLine"][x^2-2x+3, {x,a}, y, "Plot"], {a, 1, 10}]

Dataset[tangentLineAssoc]

Similar ResourceFunctions

Multicolumn[ResourceFunction/@{"CircleProperties","ConicProperties","EllipseProperties","GaloisGroupProperties","FunctionOverview","HyperbolaProperties","OsculatingCircleProperties","ParabolaProperties","RoseCurveProperties","TrigonometricProperties","NormalLine","NormalLineThrough","ParallelLineThrough","SecantLine","TangentAndNormalLine","TangentLine","TangentPlane", "CurveFitOverview","RiemannSum","FunctionSigns","FunctionMonotonicity","FunctionConcavity"},{Automatic,2}]

Interactivity

Building Dynamic Interfaces

ResourceFunction["ManipulatePlot"][
	a*Sin[b*x+c]+d, {x, 0, 2Pi},
	{a, 1/2, 3}, {{b, Pi}, Pi/2, 2Pi, Pi/2}, {c, 0,2Pi, Pi/2}, {d, 0, 4}
]

ResourceFunction["CurveAnalysis"][Sin[x],x]

ODEViewer

ResourceFunction["ODEViewer"][{x'[t]==2x[t]-y[t],y'[t]==3 x[t]-2 y[t]},{x[0]==0,y[0]==1},{x,y},{t}]

Summary of main features implemented:

Support for linear and nonlinear first order equations

Systems of 1, 2 or 3 equations

Use of WFR function SuggestPlotRange

Computation of eigensystem and equilibrium points

Recognition of types of nodes

ColorFunction proportional to the distance from equilibrium points

Dynamic interactivity, including locators and interval sliders and dynamic initial values

Two types of plots: time series and slope field

Support for stiff systems

Multiple solutions

Adjustments for gridlines

Constructing Quizzes and Building WL Expressions

We have built a framework for building dynamic interfaces with shared structures and styles to create a uniform appearance.

ResourceFunction["LinearFunctionQuiz"][]

ResourceFunction["GeometricSceneConstructor"]["Seed" -> "Line/Circle"]

Similar ResourceFunctions

Multicolumn[ResourceFunction/@{"LinearFunctionQuiz", "LinearDescriptionPlotQuiz", "QuadraticDescriptionPlotQuiz","MeanValueTheoremQuiz",  "SlopeFieldQuiz", "GeometricRotationQuiz", "GeometricReflectionQuiz", "GeometricSceneConstructor", "LinearRegressionDataQuiz", "SinusoidPlotQuiz" },{Automatic,2}]

Wrapping Up

Questions

Suggestions

Comments

Related talks

Today@11:00 - Workshop: Active Learning Notebooks for College Mathematics

Thursday@10:25 - Automated Planar Geometry

Thursday@3:30 - Office Hour: Wolfram|Alpha Notebook Edition

Many talks on paclet development